/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Manager_Image_Utils;

import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.File;
import javax.swing.ImageIcon;

/**
 *
 * @author Admin
 */
public class Images {
    //<editor-fold defaultstate="collapsed" desc="Thuoc tinh">
     private BufferedImage imgbuff;
    private Image imgbase;
    private Image imgshow;
    private File file;
    //</editor-fold>
    //<editor-fold defaultstate="collapsed" desc="Set/GET">
     public Image getImgbase() {
        return imgbase;
    }

    public void setImgbase(Image imgbase) {
        this.imgbase = imgbase;
    }

    public Image getImgshow() {
        return imgshow;
    }

    public void setImgshow(Image imgshow) {
        this.imgshow = imgshow;
    }
   
    public BufferedImage getImgBuff() {
        return imgbuff;
    }

    public void setImgBuff(BufferedImage imgbuff) {
        this.imgbuff = imgbuff;
    }
    

    public File getFile() {
        return file;
    }

    public void setFile(File file) {
        this.file = file;
    }
    //</editor-fold>
    //<editor-fold defaultstate="collapsed" desc="Phuong thuc">
     public static ImageIcon resizeIcon(ImageIcon originalIcon, int width, int height) {
        Image img = originalIcon.getImage();
        Image newimg = img.getScaledInstance(width, height, java.awt.Image.SCALE_SMOOTH);
        return new ImageIcon(newimg);
    }
    //</editor-fold>
     public static void show (){
         while(true)
         {
             System.out.println("blah");
         }
     }
     public static void helo(){
         while(true)
         {
             System.out.println("helotao la buoi");
         }
     }
     public static void main(String[] args){
         new Thread() {
            @Override
            public void run() {
                show();
            }
        }.start();
        new Thread() {
            @Override
            public void run() {
                helo();
            }
        }.start();
     }
     
    
}
